﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="Header.ascx.vb" Inherits="FrontEnd_Control_Header" %>
<%@ Import Namespace="Cls_Common" %>

<script type="text/javascript">
    $(function () {
        $(".MenuActive").each(function () {
            $(".MenuActive").parent().addClass("active");
            $("#home").removeClass("active");
        });
        //for enter search
        $("#<%= txtSearch.ClientID %>").keypress(function (e) {
            if (e.keyCode == 13) {
                $("#<%=btnSearh.ClientID()%>").click();
                return false;
            }
        });


        $("#<%= btnSearh.ClientID %>").click(function () {
            if (($("#<%= txtSearch.ClientID %>").val() == "") || ($("#<%= txtSearch.ClientID %>").val().length < 2)) {
                alert("Vui lòng nhập từ khóa");
                $("#<%= txtSearch.ClientID %>").focus();
                return false;
            }
        });

        jQuery.fn.exists = function () { return this.length > 0; }
        $(".sub").each(function () {
            if ($(this).find("li").exists() == false) {
                $(this).attr("style", "display:none");
            }
        });


    });
</script>

<div class="wrapper_banner">
    	<div class="width-page">
        	<div class="top-page">
                
            		<div class="link-top-page">
                    <%If Session("LanguageId") = 1 Then%>
                         <a  href='<%=Maindomain + "lien-he.html" %>'>Liên hệ</a> <img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/img_pipe.gif" %>' border="0" align="absmiddle">
                         <a href='<%=Maindomain + "sitemap.html" %>'>Sơ đồ</a><img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/img_pipe.gif" %>' border="0" align="absmiddle">
                          <img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/vn.gif" %>' border="0" align="absmiddle"> 
                          <asp:LinkButton ID="lbtTiengAnh" runat="server">
                            <img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/en.gif" %>' border="0" align="absmiddle">
                          </asp:LinkButton>
                               
                          <%-- Chào:<span class="link-top-page-name"> Nguyễn Thị Linh Phương</span>  --%>
                           <a class="ovalbutton" href='<%=Maindomain + "dang-nhap.html" %>' style="margin-left: 6px"><span>Đăng nhập</span></a>  
                           <a class="ovalbutton" href='<%=Maindomain + "dang-ky.html" %>' style="margin-left: 6px"><span>Đăng ký</span></a>
                             <%Else%>
                         <a  href='<%=Maindomain + "lien-he.html" %>'>Contact</a> <img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/img_pipe.gif" %>' border="0" align="absmiddle">
                         <a href='<%=Maindomain + "sitemap.html" %>'>Sitemap</a><img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/img_pipe.gif" %>' border="0" align="absmiddle">
                          <asp:LinkButton ID="lbtTiengViet" runat="server">
                          <img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/vn.gif" %>' border="0" align="absmiddle"> 
                          </asp:LinkButton>
                            <img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/en.gif" %>' border="0" align="absmiddle">
                          
                               

                    <%End If%>
                    </div>
            </div>
            <!-- Logo -->
            <div class="logo-page">
            	<a href='<%=Maindomain %>'><img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/logo_page.jpg" %>' border="0"></a>
            </div>
            <!-- END Logo -->
            
            <!-- Name page -->
            <div class="name_page">
            		<img  alt="hoanvu" src='<%=Maindomain + "FrontEnd/images/name_page.png" %>' border="0">
            </div>
            <!-- Name page -->
            
            <!-- Search page -->
            <div class="search-page">
            		
                    <asp:TextBox ID="txtSearch" runat="server" MaxLength="50" CssClass="search-keyword" placeholder='Từ khóa' ></asp:TextBox>                    
                     <asp:Button ID="btnSearh" CausesValidation="false" runat="server" CssClass="btn-search" text="Tìm" />
            </div>
            <!-- END Search page -->  
        </div>
        <!-- NaviBar -->
        <div class="wrapper_navibar">
        		<div class="menu-page">
           		<div class="bg_menuleft">&nbsp;</div>
                <div class="naviga_menu">
                        <ul id="navigation">
                            <li class="active" id="home">
                                <a href='<%=Maindomain %>'>
                                    <span class="menu-left"></span>
                                    <span class="menu-mid">
                                            <img src='<%=Maindomain + "FrontEnd/images/icon_home.png" %>' border="0" align="absmiddle" style="cursor: hand;cursor:pointer;">                                   
                                            
                                    </span>
                                    <span class="menu-right"></span>
                                </a> 
                            </li>
                                       <asp:Repeater ID="rptMenu" runat="server">
                                            <ItemTemplate>
                                                     <li>
                                                        <asp:HyperLink ID="hplTitle" runat="server">
                                                        <span class="menu-left"></span>
                                                            <asp:Label ID="lblTitle" runat="server" CssClass="menu-mid"></asp:Label>
                                                        <span class="menu-right"></span>
                                                        </asp:HyperLink>
                                                            <div class="sub">
                                                                <ul>
                                                             <asp:Repeater ID="rptMenuChild" runat="server" OnItemDataBound="rptMenuChild_ItemDataBound">
                                                                <ItemTemplate>
                                                                        <li><asp:HyperLink ID="hplTitle" runat="server">Title</asp:HyperLink></li>
                                                                </ItemTemplate>
                                                             </asp:Repeater>
                                                                </ul>
                                                                <div class="btm-bg"></div>
                                                            </div>
                                                     </li>
                                            </ItemTemplate>
                                        </asp:Repeater>
                          
                        </ul>
                 </div>
                <div class="bg_menuright">&nbsp;</div>
           </div>
        </div>
        <!-- NaviBar -->
    </div>
    <asp:HiddenField ID="hidMenuId" runat="server" Value="0" />


